package com.zxh.mall.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author zhengxh
 * @version 1.0
 * @date 2024/5/12 - 05 - 12 - 16:41
 * @description com.zxh.mall.config
 */
@Configuration
public class MyWebViewConfig implements WebMvcConfigurer {
    /**
     * 视图映射器
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/login.html").setViewName("/login");
        registry.addViewController("/reg.html").setViewName("/reg");
    }
}
